package com.gupaoedu.design.proxy.custom;

import com.gupaoedu.design.proxy.Person;
import com.gupaoedu.design.proxy.statics.Sun;

import java.lang.reflect.InvocationTargetException;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2018/3/12.
 */
public class CustomProxyTest {

    public static void main(String[] args) {
        CustomMeipo meipo = new CustomMeipo(new Sun());
        try {
            Person proxy = (Person) meipo.proxy();
            proxy.findLove();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}
